public class Solution {
    public boolean isPerfectSquare(int num) {
        int x = (int) Math.sqrt(num);
        return x * x == num;
    }

    public static void main(String[] args) {
        Solution solution = new Solution();
        int num = 16;
        System.out.println(solution.isPerfectSquare(num));
    }
}
